package edgeEnv

type name struct {
}

func (e *name) IsGateWay(appType string, appName string) bool {
	return "kernel" == appType && (appName == "gateway-service" || appName == "gateway-native")
}

func (e *name) IsManager(appType string, appName string) bool {
	return "kernel" == appType && (appName == "manager-service" || appName == "manager-native")
}

func (e *name) IsDisable(appType, appName string) bool {
	return "kernel" == appType && (appName == "gateway-service" || appName == "manager-service")
}

func (e *name) GetAppName(appType, appName string) string {
	if "kernel" == appType && (appName == "gateway-service" || appName == "gateway-native") {
		appName = e.GetGatewayName()
	}
	if "kernel" == appType && (appName == "manager-service" || appName == "manager-native") {
		appName = e.GetManagerName()
	}

	return appName
}

func (e *name) GetManagerName() string {
	return "manager-service"
}

func (e *name) GetGatewayName() string {
	return "gateway-service"
}
